import '../libs/dataset.js'
import React from 'react'
import { Redirect, Router, IndexRoute, Route, hashHistory, browserHistory } from 'react-router'
import { Provider } from 'react-redux'
import { render } from 'react-dom'
import configure from '../store'
import App from './App'
import NormalSettings from './NormalSettings'
import RoleSettings from './RoleSettings'
import UserSettings from './UserSettings'
import RemindSettings from './RemindSettings'
import KudosSettings from './KudosSettings'
import Export from './Export'

const store = configure()

render(
  <Provider store={store}>
    <Router history={hashHistory}>
      <Route path="/" component={App}>
        <IndexRoute component={NormalSettings}/>
        <Route path="normalSettings" component={NormalSettings}/>
        <Route path="roleSettings" component={RoleSettings}/>
        <Route path="KudosSettings" component={KudosSettings}/>
        <Route path="userSettings" component={UserSettings}/>
        <Route path="remindSettings" component={RemindSettings}/>
        <Route path="export" component={Export}/>
      </Route>
    </Router>
  </Provider>,
  document.getElementById('root')
)
